import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
import 'package:flutter_test1/extension/string_extension.dart';

class SortUp extends StatelessWidget {
  final String title;
  /// 0降序 1升序
  final int type;

  const SortUp({
    super.key,
    required this.title,
    required this.type,
  });

  @override
  Widget build(BuildContext context) {
    return Row(
      mainAxisSize: MainAxisSize.min,
      children: [
        title.extText(),
        Icon(
          type == 1 ? Icons.arrow_upward_rounded : Icons.arrow_downward_rounded,
          size: 25,
          color: Colors.blueAccent,
        ),
      ],
    );
  }
}
